<?php


namespace app\controller\api\common;

use app\common\repositories\system\merchant\MerchantAdRepository;
use crmeb\basic\BaseController;

class MerchantAd extends BaseController
{
    /**
     * @param MerchantAdRepository $repository
     * @return mixed
     * @author: fupeng
     * @day: 2023/11/29
     */
    public function lst(MerchantAdRepository $repository)
    {
        $data = systemConfig(['mer_link_status','mer_link']);
        $where['status'] = 1;
        [$page, $limit] = $this->getPage();
        return app('json')->success([
            'mer_link_status' =>$data['mer_link_status'],
            'mer_link' =>$data['mer_link'],
            'data'=>$repository->getApiList($where, $page, $limit,'sort desc')
        ]);
    }
}
